﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FastCodeGeneration.Core.Framework
{
    [Serializable]
    public class Condition
    {
        /// <summary>
        /// 查询条件 example :  [["name","=","1","or","age","=","2","and","gender","=","man"],"or",["address","=","cd"]]
        /// </summary>
        public String Filter { set; get; } = string.Empty;

        /// <summary>
        /// 排序 example :  ["name,asc","age,desc"]
        /// </summary>
        public String Sort { set; get; } = string.Empty;

        /// <summary>
        /// 需要查询的字段
        /// </summary>
        public String Fields { set; get; } = string.Empty;

        /// <summary>
        /// 是否把fields配置的字段,设置为排除查询的字段
        /// </summary>
        public bool ExcludeFields { set; get; } = false;

        /// <summary>
        /// 当前页
        /// </summary>
        public int PageIndex { set; get; } = 1;

        /// <summary>
        /// 分页数据量
        /// </summary>
        public int PageSize { set; get; } = 1000;

        /// <summary>
        /// 是否查询全部数据
        /// </summary>
        public bool ExportAll { set; get; } = false;
    }
}
